package com.gyc.controller;

import com.gyc.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * @author gyc
 * @date 2017/12/23
 */
@Controller
public class BaseController {
    private final static Logger logger= LoggerFactory.getLogger(BaseController.class);
    @Resource
    private UserService userService;

    @RequestMapping(value="/index")
    public String index(){
        logger.info(userService.findById(1).toString());
        System.out.println(userService.findById(1).toString());
        return "index";
    }
}
